#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "encode.h"
#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QRegExpValidator>
#include <QValidator>
#include <QRegExp>
#include <QEvent>
#include <QDebug>
#include "fileoperation.h"
#include "progressdlg.h"
#include <QProgressBar>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    QString text() const;//--
    ~MainWindow();
private slots:
    void on_pushButton_clicked();

    void on_pushButton_encode_clicked();

    void on_pushButton_choose_clicked();

    void on_comboBox_algorithm_currentIndexChanged();

    void startProgress(double progress);

protected:
    bool eventFilter(QObject *watched, QEvent *event);//--

private:
    Ui::MainWindow *ui;
    encode *code;
    QProgressBar *progressBar;
};
#endif // MAINWINDOW_H
